fix(api): allow PodGroup minMember of 0 (v0.14 backport) - #2085
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
22147dd to
da1531e
Compare
da1531e to
f774024
Compare
Adapted backport: MinMember is a non-pointer int32 on this branch, so unset and explicit 0 are indistinguishable. The CRD now accepts 0, but the scheduler keeps defaulting minAvailable to 1 to preserve existing gang semantics for PodGroups created without minMember. Signed-off-by: lin121291 <4jp33f9e@gmail.com> (cherry picked from commit 62c594b) Signed-off-by: gshaibi <gshaibi@nvidia.com>
f774024 to
d72e59d
Compare
📝 Changelog fragment recordedThanks! This PR added the changelog fragment(s) below. Pending fragments are folded into |
Description
Backport of #1989 to
v0.14.Adapted for this branch:
MinMemberhere is a plainint32(not*int32as on main) andminSubGroupdoes not exist, so:Minimum=1toMinimum=0: explicitminMember: 0(e.g. knative scale-to-zero podgroups) is no longer rejected by the API server.int32withomitemptycannot distinguish unset from explicit 0, honoring 0 would silently flip gang semantics for PodGroups created withoutminMember(this is asserted byTestSnapshotPodGroups). The full elastic minMember=0 behavior from main is therefore not backported.minSubGroupwebhook/e2e changes from the original PR are dropped (field does not exist on this branch).Same adaptation as #2086 (v0.12).
Related Issues
Backport of #1989.
Checklist
make changelog(or applied theskip-changeloglabel). Do not editCHANGELOG.mddirectly — pending fragments are folded into it at release time.Breaking Changes
None.
Additional Notes
Unit tests pass locally for
pkg/scheduler/api/podgroup_info,pkg/scheduler/cache/...,pkg/podgrouper/.../knative, andpkg/apis/scheduling/v2alpha2. The v0.9 backport (#2087) was closed: that branch never had theMinimum=1marker, so the bug does not exist there.